package com.shop.service;


import com.shop.model.User;
import com.shop.model.common.SearchPage;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface UserService {
    User login(String phone, String password);
    User loginEmail(String email, String password);

    void register(User user);

    User modifyUser(User user);
    String uplaodAvatar(MultipartFile file) throws Exception;

    List<User> searchPage(SearchPage searchPage);

    Integer searchCount(SearchPage searchPage);

    void userFreeze(Integer id);

    void userUnFreeze(Integer id);

    void blacklistAdd(Integer id);

    void blacklistRemove(Integer id);

    void userDelete(Integer id);
    void changePhone(String newPhone, User user);
    Integer deleteByPrimaryKey(Long id);

    void getChangPassword(User olduser, String password, String confirmPassword, String oldPassword);
}